<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body><table id="top_location_line" width="100%"><table id="top_location_line" width="100%"><tr width="100%"><td><a href="http://www.urchin.com"><img border="0" src="../images/google_sm.gif" width="135" height="41"></a></td><td width="100%"><span id="top_line" style="width: 100%; float: left; clear: both; border-bottom: 1px solid #CCC;"><span id="top_title" style="float: left; margin-top: 10px;"><b>Help Center</b></span></td></tr></table>
<div id="page" lang="en" dir="ltr">
<div dir="ltr" id="content" lang="en">
<p class="line867"><strong>How do I track JavaScript events?</strong> <p class="line862">To track an event, use the urchinTracker JavaScript function to specify a name for the event. For example, calling: <p class="line867"><pre>    javascript:urchinTracker('/homepage/link1');
</pre><p class="line874">will cause each occurrence of the the calling event to be logged as though it were a pageview for the URL /homepage/link1. The argument must begin with a forward slash. The event names may be organized into any directory style structure you wish. <p class="line862">For example, if you wish to organize events by page &gt; type of event, you might organize a hierarchy along these lines: <p class="line867"><pre>    * '/homepage/links/link1'
    * '/homepage/radiobuttons/button1'
    * '/contactform/rollovers/image1'
</pre><p class="line867"><strong>HTML Code Examples</strong> <p class="line874">The following illustrates how to log an onClick event: <p class="line867"><pre>    &lt;a href="javascript:void(0);" onClick="javascript:urchinTracker('/folder/file');"&gt;
</pre><p class="line874">Or, to log a rollover event: <p class="line867"><pre>    &lt;a href="javascript:void(0);" onMouseOver="javascript:urchinTracker ('/folder/file');"&gt;
</pre></div><div id="pagebottom"></div>
</div>


<div id="footer" style="clear: both; margin: 0; padding: 0; border-bottom:1px solid #CCC;"></div><div id="copyright" style="font-size: 70%; text-align: center;">&copy;2010 Google</div>
</body></html>